//
//  NavTitleView.m
//  Btpin
//
//  Created by Vic on 2019/5/4.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "NavTitleView.h"

@implementation NavTitleView

- (instancetype)initWithFrame:(CGRect)frame title:(NSString *)title position:(NSString *)position {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUIWithTitle:title position:position];
    }
    return self;
}
- (void)initUIWithTitle:(NSString *)title position:(NSString *)position {
    UILabel *titleLbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, 0, self.frame.size.width, 30) text:(title&&title.length?title:@"") textColor:THEMECOLOR_OF_TEXT_333333 font:Font_18];
    titleLbl.textAlignment = NSTextAlignmentCenter;
    [self addSubview:titleLbl];
    
    UILabel *positionLbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, EndY(titleLbl)-2, self.frame.size.width, 14) text:(position&&position.length?position:@"") textColor:THEMECOLOR_OF_TEXT_333333 font:Font_10];
    positionLbl.textAlignment = NSTextAlignmentCenter;
    [self addSubview:positionLbl];
}

@end
